﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BwTAdmin.Models
{
    public class StaticTheme
    {
        public string GetTheme()
        {
            try
            {
                var theme = HttpContext.Current.Request.Cookies["theme"];
                if (theme == null)
                {
                    return "<link rel ='stylesheet' href= '../Content/theme-black.css'/>";
                }
                else
                {
                    return $"<link rel ='stylesheet' href= '../Content/{theme.Value}.css'/>";
                }

            }
            catch (Exception)
            {
                return "<link rel ='stylesheet' href= '../Content/theme-black.css'/>";

            }
        }
    }
}